package com.pti.usermanager.dao.mapper;

import com.pti.usermanager.dao.po.IconPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @ClassName: IconMapper
 * @Author: liumengyao
 * @Description: 图标Mapper层
 * @Date: 2019/3/5
 */
@Mapper
public interface IconMapper {

    //上侧查询所有数据
    List<IconPo> findAll(@Param("iconTyp") Integer iconTyp);

    //上侧显示图标
    List<IconPo> findBranchData(@Param("usrId") Long usrId, @Param("iconTyp") Integer iconTyp);

    //移动上侧图标  先删除后添加
    void moveIcon(@Param("usrId") Long usrId,@Param("iconId") Long iconId,@Param("sort") Integer sort);

    //根据用户删除
    void delIconByUsrId(@Param("usrId") Long usrId,@Param("iconTyp") Integer iconTyp);

    //根据用户id查询部门id
    Long findorgIdByUsrId(@Param("usrId") Long userId,@Param("orgType") Integer orgType);

    //根据部门id查询左侧显示图标
    List<IconPo> findIconByOrgId(@Param("orgId") Long orgId,@Param("iconTyp") Integer iconTyp);

}